//go:build wireinject
// +build wireinject

// The build tag makes sure the stub is not built in the final build.

package app

import (
	"github.com/google/wire"
	"sieve_admin_server/app/api"
	"sieve_admin_server/app/api/util"
	"sieve_admin_server/app/dao"
	"sieve_admin_server/app/router"
	"sieve_admin_server/app/service"
)

func BuildInjector() (*Injector, func(), error) {
	panic(wire.Build(
		wire.Struct(new(util.EmptyAPI)),
		InitDb,
		api.APISet,
		service.ServiceSet,
		router.RouterSet,
		dao.RepoSet,
		InjectorSet,
	))
	return new(Injector), nil, nil
}
